
package com.chongchong.user.feign;

import com.chongchong.user.entity.Attach;
import com.chongchong.core.tool.api.R;
import org.springframework.stereotype.Component;
import org.springframework.web.multipart.MultipartFile;

import javax.servlet.http.HttpServletResponse;
import java.io.IOException;

/**
 * Feign失败配置
 *
 * @author
 */
@Component
public class IAttachClientFallback implements IAttachClient {

	@Override
	public R<Attach> upload(MultipartFile file ) throws IOException {
		return R.fail("文件上传失败");
	}

	/**
	 * 文件下载
	 * @param response
	 * @param fileId
	 * @return
	 */
	@Override
	public void download(HttpServletResponse response, Long fileId ) {
		return;
	}
}
